-- RECIPETABS
local function SetTabs()
	local tabs = {
	TOOLS = {str = "TOOLS", sort=0, icon = "tab_tool.tex"},
    LIGHT = {str = "LIGHT", sort=1, icon = "tab_light.tex"},
    SURVIVAL = {str = "SURVIVAL", sort=2, icon = "tab_trap.tex"},
    FARM = {str = "FARM", sort=3, icon = "tab_farm.tex"},
    SCIENCE = {str = "SCIENCE", sort=4, icon = "tab_science.tex"},
    WAR = {str = "WAR", sort=5, icon = "tab_fight.tex"},
	}

	local tabs = {
    TOOLS = {str = "TOOLS", sort=0, icon = "tab_tool.tex"},
    LIGHT = {str = "LIGHT", sort=1, icon = "tab_light.tex"},
    SURVIVAL = {str = "SURVIVAL", sort=2, icon = "tab_trap.tex"},
    FARM = {str = "FARM", sort=3, icon = "tab_farm.tex"},
    SCIENCE = {str = "SCIENCE", sort=4, icon = "tab_science.tex"},
    WAR = {str = "WAR", sort=5, icon = "tab_fight.tex"},
    TOWN = {str = "TOWN", sort=6, icon = "tab_build.tex"},
    REFINE = {str = "REFINE", sort=7, icon = "tab_refine.tex"},
    MAGIC = {str = "MAGIC", sort=8, icon = "tab_arcane.tex"},
    DRESS = {str = "DRESS", sort=9, icon = "tab_dress.tex"},
    ANCIENT = {str = "ANCIENT", sort = 10, icon = "tab_crafting_table.tex"}
	}

	local tabs =
	{
	    TOOLS    = { str = "TOOLS",    sort =  0, icon = "tab_tool.tex"           },
	    LIGHT    = { str = "LIGHT",    sort =  1, icon = "tab_light.tex"          },
	    SURVIVAL = { str = "SURVIVAL", sort =  2, icon = "tab_trap.tex"           },
	    FARM     = { str = "FARM",     sort =  3, icon = "tab_farm.tex"           },
	    SCIENCE  = { str = "SCIENCE",  sort =  4, icon = "tab_science.tex"        },
	    WAR      = { str = "WAR",      sort =  5, icon = "tab_fight.tex"          },
	    TOWN     = { str = "TOWN",     sort =  6, icon = "tab_build.tex"          },
	    REFINE   = { str = "REFINE",   sort =  7, icon = "tab_refine.tex"         },
	    MAGIC    = { str = "MAGIC",    sort =  8, icon = "tab_arcane.tex"         },
	    DRESS    = { str = "DRESS",    sort =  9, icon = "tab_dress.tex"          },
	    ANCIENT  = { str = "ANCIENT",  sort = 10, icon = "tab_crafting_table.tex" }       
	}

	GLOBAL.RECIPETABS = tabs

end

-- RECIPES
local function SetRecipes()
	-- GLOBAL.Recipes = {Recipes["firepit"]}
end

local CraftTabs = require "widgets/crafttabs"

local old_ctor = CraftTabs._ctor
function CraftTabs._ctor(self, owner, ...)
	if IsModeRG() then
		SetTabs()
		SetRecipes()
	end

	old_ctor(self, owner, ...)

	self.bg:Hide()
	self.bg_cover:Hide()
end